# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=emacs-lab
pkgver=2.0.0
pkgrel=0
_pkgreal=lab
pkgdesc="Emacs interface for GitLab"
url="https://github.com/isamert/lab.el"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	cmd:curl
	cmd:emacs
	emacs-async-await
	emacs-compat
	emacs-f
	emacs-memoize
	emacs-promise
	emacs-request
	emacs-s
	"
makedepends="emacs-nox"
source="https://github.com/isamert/lab.el/archive/v$pkgver/emacs-lab-$pkgver.tar.gz"
builddir="$srcdir/lab.el-$pkgver"
options="!check" # no tests provided

build() {
	emacs -batch -q -no-site-file -L . \
		-eval '(setq byte-compile-error-on-warn t)' \
		-f batch-byte-compile \
		./*.el
}

package() {
	install -Dvm644 ./*.el ./*.elc \
		-t "$pkgdir"/usr/share/emacs/site-lisp/

	cd "$pkgdir"/usr/share/emacs/site-lisp
	emacs -batch -q -no-site-file \
		-eval "(loaddefs-generate \".\" \"$_pkgreal-loaddefs.el\")"
}

sha512sums="
0835b57ddc74f1b066a36082cc89451b76637f6b1d4aba3313213baad45a5a77d3ff1a3cf595b2376a99b45d41c4d5aa94fe80a45e6c9157a5a558a68d06925d  emacs-lab-2.0.0.tar.gz
"
